From: Ian Campbell Date: Thu, 2 Jun 2011 16:36:02 +0000 (+0100) Subject: xl: print sxp on dry-run of create. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10224^2~14 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=83cd67d589caf8d5111d575e5a4bc93763664fb1;p=xen.git xl: print sxp on dry-run of create. The help text for xm create's --dry-run says "Dry run - prints the resulting configuration in SXP but does not create the domain." so update xl implementation to match. At least the xendomains initscript relies on this (for better or worse). Signed-off-by: Ian Campbell Tested-by: Carsten Schiers Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index ddd3c64e6d..ca0841d5e0 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1516,10 +1516,6 @@ static int create_domain(struct domain_create *dom_info) parse_config_data(config_file, config_data, config_len, &d_config, &d_config.dm_info); - ret = 0; - if (dom_info->dryrun) - goto out; - if (migrate_fd >= 0) { if (d_config.c_info.name) { /* when we receive a domain we get its name from the config @@ -1538,9 +1534,13 @@ static int create_domain(struct domain_create *dom_info) } } - if (debug) + if (debug || dom_info->dryrun) printf_info(-1, &d_config, &d_config.dm_info); + ret = 0; + if (dom_info->dryrun) + goto out; + start: domid = -1;